<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>H+ 后台主题UI框架 - 项目</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

    <link rel="shortcut icon" href="favicon.ico"> <link href="/static/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/static/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">

    <link href="/static/admin/css/animate.css" rel="stylesheet">
    <link href="/static/admin/css/style.css?v=4.1.0" rel="stylesheet">

</head>

<body class="gray-bg">

    <div class="wrapper wrapper-content animated fadeInUp">
        <div class="row">
            <div class="col-sm-12">

                <div class="ibox">
                    <div class="ibox-title">
                        <h5>所有项目</h5>
                        <div class="ibox-tools">
                            <a href="projects.html" class="btn btn-primary btn-xs">创建新项目</a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="row m-b-sm m-t-sm">
                            <div class="col-md-1">
                                <button type="button" id="loading-example-btn" class="btn btn-white btn-sm"><i class="fa fa-refresh"></i> 刷新</button>
                            </div>
                            <div class="col-md-11">
                                <div class="input-group">
                                    <input type="text" placeholder="请输入项目名称" class="input-sm form-control"> <span class="input-group-btn">
                                        <button type="button" class="btn btn-sm btn-primary"> 搜索</button> </span>
                                </div>
                            </div>
                        </div>

                        <div class="project-list">

                            <table class="table table-hover">
                                <tbody>
                                {foreach $orderData as $k=>$v}
                                <tr class="getid" sid="{$v['id']}">
                                        <td class="project-status" >
                                            {if condition="$v['status']==1"}
                                            <span class="label label-danger">待发货</span>
                                            {else/}
                                            <span class="label label-primary">已发货</span>

                                            {/if}
                                        </td>
                                        <td class="project-title">
                                            订单编号:<span style="color: red"> {$v['order_num']}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
                                            {foreach $v['list'] as $k=>$val}
                                            <a href="project_detail.html">{$val['title']}</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                            单价:<span style="color: red">￥{$val['price']}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
                                            数量:<span style="color: red">{$val['num']}</span>
                                            颜色:<span style="color: red">{$val['color']}</span>
                                            尺码:<span style="color: red">{$val['size']}</span></br>
                                            {/foreach}
                                            <small>{$val['create_time']}</small>
                                        </td>
                                        <td class="project-completion">
                                                <small>备注</small>
                                            <div class="alert alert-success">
                                                    {$v['memo']}
                                            </div>
                                        </td>
                                    <td class="project-completion">
                                        <small>姓名</small>
                                        <div class="alert alert-success">
                                                    {$v['username']}
                                        </div>
                                    </td>

                                        <td class="project-people">
                                            {foreach $v['list'] as $k=>$val}
                                            <p href="projects.html"><img alt="image" class="img-circle" src="/{$val['pic']}"></p>
                                            <br>
                                            {/foreach}
                                        </td>

                                        <td class="project-actions">
                                            {if condition="$v['status']==1"}
                                            <a href="javascript:;" class="push"  class="btn btn-white btn-sm"><i class="fa fa-folder"></i> 发货 </a>
                                            {/if}
                                        </td>
                                    </tr>
                                {/foreach}
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    <!-- 全局js -->
    <script src="/static/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/static/admin/js/bootstrap.min.js?v=3.3.6"></script>


    <!-- 自定义js -->
    <script src="/static/admin/js/content.js?v=1.0.0"></script>


    <script>
        $(document).ready(function(){

            $('#loading-example-btn').click(function () {
                btn = $(this);
                simpleLoad(btn, true)

                // Ajax example
//                $.ajax().always(function () {
//                    simpleLoad($(this), false)
//                });

                simpleLoad(btn, false)
            });
        });

        function simpleLoad(btn, state) {
            if (state) {
                btn.children().addClass('fa-spin');
                btn.contents().last().replaceWith(" Loading");
            } else {
                setTimeout(function () {
                    btn.children().removeClass('fa-spin');
                    btn.contents().last().replaceWith(" Refresh");
                }, 2000);
            }
        }
        $('.push').click(function() {

            var data = {
            'sid': sid = $(this).parents(".getid").attr('sid')
        }

//            alert(data);
            $.post("{:url('admin/order/ajaxPush')}",data,function(res){
                //添加完成购物车之后，跳转到购物车页面
                if (res =1){
//                    location.href = "{:url('index/order/index')}";
                    location.reload(force)
                }

            },'json')

        });

    </script>

    <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script><!--统计代码，可删除-->

    </body>
</html>
